package com.jic.market.enums;

/**
 * 优惠券批次类型
 * @date: 2020/3/10
 */
public enum MarketCouponPeriodTypeEnum {


    GENERATE (1, "生成"),
    BINDING(2, "绑定"),
    ;

    private Integer code;
    private String message;

    MarketCouponPeriodTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public MarketCouponPeriodTypeEnum getByCode(Integer code){
        MarketCouponPeriodTypeEnum[] values = MarketCouponPeriodTypeEnum.values();
        for(MarketCouponPeriodTypeEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
